//#define __FORCE_TRACE__
//#define __FORCE_DEBUG__
//#define __FORCE_INFO__
#define THIS_FILE "aisuppress\fn_setSphereColor.sqf"
#include <core_macros.h>

TRACE_1("Start",_this);
TMFPROFILERSTART;

private ["_unit","_sphere","_color"];
DEFAULT_PARAM(_unit,0,objNull);
DEFAULT_PARAM(_color,1,ARR_3(0,0,0));

if (GVAR(DEBUG_SPHERE)) then {
	_sphere = _unit getVariable [QGVAR(DEBUG_SPHERE),objNull];
	if (isNull _sphere) then {
		_sphere = [_unit] call FUNC(addSphere);
	};
	if (!isNull _sphere) then {
		_sphere setObjectTextureGlobal [0,format["#(argb,8,8,3)color(%1,%2,%3,0.6)",_color select 0,_color select 1,_color select 2]];
	};
};

TRACE("End");
TMFPROFILERSTOP;
